package adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.parkcar.R;

import java.util.List;

import ui.wheel.adapter.AbstractWheelTextAdapter;

public class TimeWheelListAdapter  extends AbstractWheelTextAdapter {
	private List<String> list;

	public TimeWheelListAdapter(Context context, List<String> list, int currentItem, int maxTextSize, int minTextSize) {
		super(context, R.layout.wheel_text_layout, NO_RESOURCE, currentItem, maxTextSize, minTextSize);
		this.list = list;
		setItemTextResource(R.id.tv_value);
	}


	@Override
	public View getItem(int index, View cachedView, ViewGroup parent) {
		View view = super.getItem(index, cachedView, parent);
		return view;
	}

	@Override
	public int getItemsCount() {
		return list.size();
	}

	@Override
	public CharSequence getItemText(int index) {
		return list.get(index) + "";
	}
}